Xbasic

LOAD_LIBRARY Function

Syntax

Handle as N = LOAD_LIBRARY(C library[,L run_autoexec])

Arguments

libraryCharacter

The path and filename of the library to load. The library will have an ".AEX" extension.

run_autoexecLogical

Default = .T. (TRUE). If true (.T.), runs the script named "autoexec" when the library is loaded. Otherwise, if false (.F.), does not run the "autoexec" script.

Description

Load an AEX file so that a5 can use it, returns a level handle 0-255, run_autoexec is assumed TRUE if not specified - any script named autoexec is run when the AEX file is opened.

Discussion

The LOAD_LIBRARY() function loads the named library (.AEX file). Returns a Handle with a value between 0 and 255.

Example

fn = "c:\bugs\actionscript" + chr(92) + "aextest.aex"
? load_library(fn) = 100
? sayhellofunction() = "Hello"
? addin.run("sayhelloscript")
= "Hello"
The LOAD_LIBRARY() function does not allow SCRIPT_PLAY() to run scripts.

See Also